import Vue from 'vue'
import VueRouter from 'vue-router'
import login from '../views/login'
import home from '../views/home'

Vue.use(VueRouter)

const routes = [
  {
    path: "/login",
    component:login
  },
  {
    path: "/home",
    component:home,
    children:[
      {
        path:"/toBranch",
        component:()=>import("../views/branch")
      },
      {
        path:"/toStaff",
        component:()=>import("../views/staff")
      }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
